<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<div class="col-xs-12 myj-crumbs p-right0" id="categoryNav">
	<span>当前位置：</span>
	<span>订单</span>
	<span style="font-family:simsun">&gt;</span>
	<span id="cNavSpan">
		订单搜索</span>
	<a class="pull-right m-right20" href="https://help.dianxiaomi.com/pre/getContent.htm?id=1340" target="_blank">查看帮助</a>
		</div>
<div  class="col-xs-12 p0 mTop5">
		<div class="col-xs-12 p0 borderBtm">
			<ul class="ulBtn text-center p0" style="min-width:450px;margin:0 0 0 10px;">
				<li class="liBtn liFoucs" onclick="selState('m1-1','',-1,1);">120天内订单</li>
				<li class="liBtn " onclick="selState('m1-1','',-1,1, 'all');">历史订单</li>
			</ul>
		</div>
	</div>
<div class="col-xs-12 border3 borderBottomNo borderTopNo p-bottom10 orderFiltrateIsFold " style="position:relative;">
	<div class="col-xs-12 p0 orderFiltrateIsFoldBox">
        <table class="searchTab">
			<tr>
				<td class="tit">平台渠道：</td>
				<td class="con">
                    <a class="mRight15 myj-aFocus myj-active" href="javascript:" data-platforms="" onclick="selPlatform('',this);">全部</a>
					
					<!---
					<% channel.forEach(function(item){%>
						<a class="mRight15 myj-aFocus" href="javascript:" data-platforms=<%=item.title %> onclick="selPlatform(<%=item.data %>,this);"><%=item.title %></a>
					 <% }) %>
					--->
						</td>
			</tr>
		</table>
	</div>
	<div class="rightTab dataTypeClick">
			<span class="rightTabActive" data-type="1">筛选</span>
			<span class="" data-type="2">搜索</span>
		</div>
	<div class="col-xs-12 p0 shopIsShowHideBox orderFiltrateIsFoldBox">
		<div class="shopMoreBox"></div>
		<table class="searchTab">
			<tr>
				<td class="tit">店铺账号：</td>
				<td class="con shopChoose p-right70" id="shopDiv">
					<div class="more-shop-group-parent shopGroupParent p-right40">
						<input type="hidden" id="shopGroupId" value=""/><div class="flow-h singleShopDiv">
							<div class="multiple-position position-t3">
								<span class="iconfont icon_single_store more-shop-group-type shopGroupType f20" data-type="1"
									  data-container="body" data-toggle="popover" data-trigger="hover" data-html="true"
									  data-placement="top" data-content="点击切换为多店铺模式，支持多店铺筛选"></span>
							</div>
							<a class="m-right15 myj-aFocus shop-group-item shopItem myj-active"
							   href="javascript:" data-shopId="-1" onclick="selShop('-1',this);" data-platform="" id="shopAllDiv">全部</a>
							
							<!---
							<% acount.forEach(function(item){%>
								<a class="m-right15 myj-aFocus shop-group-item shopItem" href="javascript:"
										   data-shopId=<%=item.data%> onclick="selShop(<%=item.data%>,this);"
										   data-platform="tiktok">
								            <%=item.title%>
										</a>
							 <% }) %>
							--->
								</div>

						<div class="flow-h moreShopGroupDiv hide">
							<div class="multiple-position m-top5">
								<span class="more-shop-group-add" onclick="SHOP_GROUP.addShopGroupModalShow(1);">创建分组</span>
								<span class="iconfont icon_multiple_store more-shop-group-type shopGroupType" data-type="2"
									  data-container="body" data-toggle="popover" data-trigger="hover" data-html="true"
									  data-placement="top" data-content="点击切换为单店铺模式，支持单店铺筛选"></span>
							</div>
							<div class="shopGroupList" data-platform="">
								<a href="javascript:" class="m-right15 myj-aFocus shop-group-item shopItem myj-active" onclick="SHOP_GROUP.selShop('-1', this)">全部</a>
							</div>
						</div>
					</div>
				</td>
			</tr>
		</table>
	</div>
</div>
<div class="tab-content col-xs-12 border3 borderTopNo p-bottom10 orderFiltrateIsFoldBox orderFiltrateIsFoldBox2 hide" style="position:relative;">
	<div role="tabpanel" class="tab-pane active col-xs-12 p0">
		<div class="col-xs-12 dataType p0" data-type="2">
			<div class="col-xs-12 p0" id="searchTypeDiv">
				<table class="searchTab">
					<tr>
						<td class="tit">搜索类型：</td>
						<td class="orderSearchType">
							<a class="mRight15 myj-active myj-aFocus" href="javascript:" data-name="orderId" onclick="setSearchType('orderId',this);">订单号</a>
							<a class="mRight15 myj-aFocus" href="javascript:" data-name="packageNumber" onclick="setSearchType('packageNumber',this);">包裹号</a>
							<a class="mRight15 myj-aFocus" href="javascript:" data-name="trackNumber" onclick="setSearchType('trackNumber',this);">跟踪号</a>
							<a class="mRight15 myj-aFocus" href="javascript:" data-name="fCode" onclick="setSearchType('fCode',this);">物流商单号</a>
							<a class="mRight15 myj-aFocus" href="javascript:" data-name="sku" onclick="setSearchType('sku',this);">平台SKU</a>
							<a class="mRight15 myj-aFocus" href="javascript:" data-name="productSku" onclick="setSearchType('productSku',this);">商品SKU</a>
							<a class="mRight15 myj-aFocus" href="javascript:" data-name="skuCode" onclick="setSearchType('skuCode',this);">商品编码</a>
							<a class="mRight15 myj-aFocus" href="javascript:" data-name="buyerAccount" onclick="setSearchType('buyerAccount',this);">买家账号</a>
							<a class="mRight15 myj-aFocus" href="javascript:" data-name="contactName" onclick="setSearchType('contactName',this);">收件人</a>
							<a class="mRight15 myj-aFocus" href="javascript:" data-name="sellerComment" onclick="setSearchType('sellerComment',this);">备注</a>
							<a class="mRight15 myj-aFocus" href="javascript:" data-name="email" onclick="setSearchType('email',this);">邮箱</a>
							<a class="mRight15 myj-aFocus productIDA hide" href="javascript:" data-name="productId" onclick="setSearchType('productId',this);">产品ID</a>
						</td>
					</tr>
				</table>
			</div>
			<div class="col-xs-12 p0 searchTr" id="searchDiv">
				<form class="doNotSubmit">
					<table class="searchTab">
						<tr>
							<td class="tit">搜索内容：</td>
							<td class="con">
								<div class="search-group-sel">
									<input class="form-control search-group-ipt serchIpt batchSearchType w450" type="text" data-maxnum="1000" data-spacewrap="true" placeholder="多个订单号间用逗号或空格隔开，最多支持1000个" id="searchContent" />
									<select class="search-group-item" id="orderSearchType" onchange="changeSearchType()">
										<option value="1">精确匹配</option>
										<option value="0">模糊匹配</option>
									</select>
								</div>
								<button class="button btn-determine serchBtn m-left10" type="submit" onclick="searchPackage();">搜索</button>
								<span class="advancedSearchBtn m-left10" onclick="showAdvancedSearch();"><a href="javascript:">高级搜索</a></span>
							</td>
						</tr>
						<tr>
							<td class="tit"></td>
							<td class="con">
								<div class="custom-sign custom-sign-sel m-left0" id="customCommentSearchDiv">
									<span class="module module-a" uid="moduleA" data-type="0" data-container="body" data-toggle="popover" data-placement="right" data-content=""></span>
									<span class="module module-b" uid="moduleB" data-type="0" data-container="body" data-toggle="popover" data-placement="right" data-content=""></span>
									<span class="module module-c" uid="moduleC" data-type="0" data-container="body" data-toggle="popover" data-placement="right" data-content=""></span>
									<span class="module module-d" uid="moduleD" data-type="0" data-container="body" data-toggle="popover" data-placement="right" data-content=""></span>
									<span class="module module-e" uid="moduleE" data-type="0" data-container="body" data-toggle="popover" data-placement="right" data-content=""></span>
									<span class="module module-f" uid="moduleF" data-type="0" data-container="body" data-toggle="popover" data-placement="right" data-content=""></span>
									<span class="module module-w" uid="moduleW" data-type="0" data-container="body" data-toggle="popover" data-placement="right" data-content=""></span>
									<span class="module module-x" uid="moduleX" data-type="0" data-container="body" data-toggle="popover" data-placement="right" data-content=""></span>
									<span class="module module-y" uid="moduleY" data-type="0" data-container="body" data-toggle="popover" data-placement="right" data-content=""></span>
									<span class="module module-z" uid="moduleZ" data-type="0" data-container="body" data-toggle="popover" data-placement="right" data-content=""></span>
									<span class="module module-i" uid="moduleI" data-type="0" data-container="body" data-toggle="popover" data-placement="right" data-content=""></span>
								</div>
							</td>
						</tr>
					</table>
				</form>
			</div>
			<form id="advancedForm">
				<div id="advancedSearchDiv" pid="advancedSearch" class="advancedSearch w850" style="background-color:#F6F6F5;display:none;">
					<div class="p20 p-bottom10 borderBtm3">
						<div  class="m-bottom5 p-right10 w105 f-right">搜索类型：</div>
						<div class="advSerachDiv">
							<select class="w150 m-left26 genre advSearchType" id="advSearchType" name="searchTypes" onchange="setAdvSearchType(0, this);">
								<option value="orderId">订单号</option>
								<option value="packageNum">包裹号</option>
								<option value="trackNum">跟踪号</option>
								<option value="platformSku">平台SKU</option>
								<option value="productSku">商品SKU</option>
								<option value="skuCode">商品编码</option>
								<option value="buyerAccount">买家账号</option>
								<option value="contactName">收件人</option>
								<option value="batchNum">拣货单号</option>
								<option value="sellerComment">备注</option>
								<option value="email">邮箱</option>
								<option class="productIDA hide" value="productId">产品ID</option>
							</select>
							<input class="genre w500" id="advSearchContent" name="contents" type="text" data-maxnum="1000" data-spacewrap="true" placeholder="多个订单号间用逗号或空格隔开，最多支持1000个" />
							<select class="w90 m-left26 genre m-left0 orderAdvSearchType" id="orderAdvSearchType" name="orderAdvSearchType" onchange="changeSearchType(this, true)">
								<option value="1">精确匹配</option>
								<option value="0">模糊匹配</option>
							</select>
							<input id="advancedState" name="state" type="hidden" />
							<input id="advancedVoided" name="isVoided" type="hidden" />
							<input id="advancedRemoved" name="isRemoved" type="hidden" />
							<input id="advancedCommitPlatform" name="commitPlatforms" type="hidden" />
							<input id="advancedIsOversea" name="isOversea" type="hidden" />
							<input id="advancedShopId" name="shopId" type="hidden" />
							<input id="advancedPlatform" name="platform" type="hidden" />
							<input id="advancedHistory" name="history" type="hidden" />
							<input id="advanceOrderField" name="orderField" type="hidden" />
							<input id="advanceIsDesc" name="isDesc" type="hidden" />
							<input id="advancedTimeOut" name="timeOut" type="hidden"/>

							<input id="advancedIsGreen" name="isGreen" type="hidden" />
							<input id="advancedIsYellow" name="isYellow" type="hidden" />
							<input id="advancedIsOrange" name="isOrange" type="hidden" />
							<input id="advancedIsRed" name="isRed" type="hidden" />
							<input id="advancedIsViolet" name="isViolet" type="hidden" />
							<input id="advancedIsBlue" name="isBlue" type="hidden" />
							<input id="advancedCornflowerBlue" name="cornflowerBlue" type="hidden" />
							<input id="advancedPink" name="pink" type="hidden" />
							<input id="advancedTeal" name="teal" type="hidden" />
							<input id="advancedTurquoise" name="turquoise" type="hidden" />
							<input id="advancedUnmarked" name="unmarked" type="hidden" />
							<input id="advancedForbiddenStatus" name="forbiddenStatus" type="hidden" />
							<input id="advancedForbiddenReason" name="forbiddenReason" type="hidden" />
							<input id="pickingInstructions" name="pickingInstructions" type="hidden" />
						</div>
						<a class="inline-block m-top10 m-left26" href="javascript:" onclick="userSetAttr(this);">+添加搜索类型</a>
					</div>
					<div class="p20 pTop10 classifiedContent classifiedContentHid">
						<table>
							<tr>
								<td class="w120 f-right">订单标记：</td>
								<td class="w500">
									<div class="custom-sign custom-sign-sel m-left0" id="customCommentAdvenceSearchDiv">
										<span class="module module-a" uid="moduleA" data-type="0" data-container="body" data-toggle="popover" data-placement="right" data-content=""></span>
										<span class="module module-b" uid="moduleB" data-type="0" data-container="body" data-toggle="popover" data-placement="right" data-content=""></span>
										<span class="module module-c" uid="moduleC" data-type="0" data-container="body" data-toggle="popover" data-placement="right" data-content=""></span>
										<span class="module module-d" uid="moduleD" data-type="0" data-container="body" data-toggle="popover" data-placement="right" data-content=""></span>
										<span class="module module-e" uid="moduleE" data-type="0" data-container="body" data-toggle="popover" data-placement="right" data-content=""></span>
										<span class="module module-f" uid="moduleF" data-type="0" data-container="body" data-toggle="popover" data-placement="right" data-content=""></span>
										<span class="module module-w" uid="moduleW" data-type="0" data-container="body" data-toggle="popover" data-placement="right" data-content=""></span>
										<span class="module module-x" uid="moduleX" data-type="0" data-container="body" data-toggle="popover" data-placement="right" data-content=""></span>
										<span class="module module-y" uid="moduleY" data-type="0" data-container="body" data-toggle="popover" data-placement="right" data-content=""></span>
										<span class="module module-z" uid="moduleZ" data-type="0" data-container="body" data-toggle="popover" data-placement="right" data-content=""></span>
										<span class="module module-i" uid="moduleI" data-type="0" data-container="body" data-toggle="popover" data-placement="right" data-content=""></span>
									</div>
								</td>
							</tr>
							<tr>
								<td class="w120 f-right">订单金额：</td>
								<td class="w500">
									<input type="text" name="priceStart" class="genre w180" onkeyup="commonSearchSave.removeSearchModalActiveClass();">
									&nbsp;&nbsp;-&nbsp;&nbsp;
									<input type="text" name="priceEnd" class="genre w180" onkeyup="commonSearchSave.removeSearchModalActiveClass();">
								</td>
							</tr>
							<tr>
								<td class="w120 f-right">下单时间：</td>
								<td class="w500">
									<input class="Wdate genre w180" name="orderCreateStart" type="text"
										   autocomplete="off" onclick="WdatePicker(WdatePicker({dateFmt: 'yyyy-MM-dd HH:mm:ss',startDate: '%y-%M-%d 00:00:00'}));" />
									&nbsp;&nbsp;-&nbsp;&nbsp;
									<input class="Wdate genre w180" name="orderCreateEnd" type="text"
										   autocomplete="off" onclick="WdatePicker(WdatePicker({dateFmt: 'yyyy-MM-dd HH:mm:ss',startDate: '%y-%M-%d 23:59:59'}));" />
								</td>
							</tr>
							<tr>
								<td class="w120 f-right">付款时间：</td>
								<td class="w500">
									<input class="Wdate genre w180" name="orderPayStart" type="text"
										   autocomplete="off" onclick="WdatePicker(WdatePicker({dateFmt: 'yyyy-MM-dd HH:mm:ss',startDate: '%y-%M-%d 00:00:00'}));" />
									&nbsp;&nbsp;-&nbsp;&nbsp;
									<input class="Wdate genre w180" name="orderPayEnd" type="text"
										   autocomplete="off" onclick="WdatePicker(WdatePicker({dateFmt: 'yyyy-MM-dd HH:mm:ss',startDate: '%y-%M-%d 23:59:59'}));" />
								</td>
							</tr>
							<tr>
								<td class="w120 f-right">发货时间：</td>
								<td class="w500">
									<input class="Wdate genre w180" name="shippedStart" type="text"
										   autocomplete="off" onclick="WdatePicker(WdatePicker({dateFmt: 'yyyy-MM-dd HH:mm:ss',startDate: '%y-%M-%d 00:00:00'}));" />
									&nbsp;&nbsp;-&nbsp;&nbsp;
									<input class="Wdate genre w180" name="shippedEnd" type="text"
										   autocomplete="off" onclick="WdatePicker(WdatePicker({dateFmt: 'yyyy-MM-dd HH:mm:ss',startDate: '%y-%M-%d 23:59:59'}));" />
								</td>
							</tr>
							<tr>
								<td class="w120 f-right">退款时间：</td>
								<td class="w500">
									<input class="Wdate genre w180" name="refundedStart" type="text"
										   autocomplete="off" onclick="WdatePicker(WdatePicker({dateFmt: 'yyyy-MM-dd HH:mm:ss',startDate: '%y-%M-%d 00:00:00'}));" />
									&nbsp;&nbsp;-&nbsp;&nbsp;
									<input class="Wdate genre w180" name="refundedEnd" type="text"
										   autocomplete="off" onclick="WdatePicker(WdatePicker({dateFmt: 'yyyy-MM-dd HH:mm:ss',startDate: '%y-%M-%d 23:59:59'}));" />
								</td>
							</tr>
							<tr>
								<td class="w120 f-right">面单打印时间：</td>
								<td class="w500">
									<div class="date-picker-box">
										<i class="iconfont icon_calendar date-picker-calendar"></i>
										<input class="form-component date-picker-ipt w180-imp dataTimeInput starDayInput" name="mdSignStart"
											   type="text" placeholder="请选择日期" />
										<i class="iconfont icon_close date-picker-clear" rol="dateClear"></i>
									</div>
									&nbsp;&nbsp;-&nbsp;&nbsp;
									<div class="date-picker-box">
										<i class="iconfont icon_calendar date-picker-calendar"></i>
										<input class="form-component date-picker-ipt w180-imp dataTimeInput endDayInput" name="mdSignEnd"
											   type="text" placeholder="请选择日期" />
										<i class="iconfont icon_close date-picker-clear" rol="dateClear"></i>
									</div>
								</td>
							</tr>
							<tr>
								<td class="w120 f-right">拣货单打印时间：</td>
								<td class="w500">
									<div class="date-picker-box">
										<i class="iconfont icon_calendar date-picker-calendar"></i>
										<input class="form-component date-picker-ipt w180-imp dataTimeInput starDayInput" name="jhSignStart"
											   type="text" placeholder="请选择日期" />
										<i class="iconfont icon_close date-picker-clear" rol="dateClear"></i>
									</div>
									&nbsp;&nbsp;-&nbsp;&nbsp;
									<div class="date-picker-box">
										<i class="iconfont icon_calendar date-picker-calendar"></i>
										<input class="form-component date-picker-ipt w180-imp dataTimeInput endDayInput" name="jhSignEnd"
											   type="text" placeholder="请选择日期" />
										<i class="iconfont icon_close date-picker-clear" rol="dateClear"></i>
									</div>
								</td>
							</tr>
							<tr>
								<td class="w120 f-right">剩余发货：</td>
								<td class="w650">
									<label><input class="orderAdvancedSearchRad" type="radio" name="timeOutQuery" value="-1" checked>全部</label>
									<label><input class="orderAdvancedSearchRad" type="radio" name="timeOutQuery" value="0">到期</label>
									<label><input class="orderAdvancedSearchRad" type="radio" name="timeOutQuery" value="1">1天内</label>
									<label><input class="orderAdvancedSearchRad" type="radio" name="timeOutQuery" value="2">2天内</label>
									<label><input class="orderAdvancedSearchRad" type="radio" name="timeOutQuery" value="3">3天内</label>
									<label><input class="orderAdvancedSearchRad" type="radio" name="timeOutQuery" value="5">5天内</label>
									<label><input class="orderAdvancedSearchRad" type="radio" name="timeOutQuery" value="6">大于5天</label>
								</td>
							</tr>
							<tr>
								<td class="w120 f-right">包裹类型：</td>
								<td class="w500">
									<label class="w60"><input class="advancedSearchAllPackgeType" type="checkbox" name="productStatus" value="">全部</label>
									<label><input class="advancedSearchPackgeType" type="checkbox" name="productStatus" value="1">单品单数</label>
									<label><input class="advancedSearchPackgeType" type="checkbox" name="productStatus" value="2">单品多数</label>
									<label><input class="advancedSearchPackgeType" type="checkbox" name="productStatus" value="3" >
										<span data-container="body" data-toggle="popover" data-trigger="hover" data-html="true" data-placement="top"
											  data-content="多品混包指包裹里包含两种以上SKU">多品混包</span></label>
							</tr>
							<tr>
								<td class="w120 f-right">订单商品数量：</td>
								<td class="w500">
									<input type="text" name="productCountStart" class="genre w180" onkeyup="commonSearchSave.removeSearchModalActiveClass();">
									&nbsp;&nbsp;-&nbsp;&nbsp;
									<input type="text" name="productCountEnd" class="genre w180" onkeyup="commonSearchSave.removeSearchModalActiveClass();">
								</td>
							</tr>
							<tr>
								<td class="w120 f-right">发货仓库：</td>
								<td>
									<input class="absolute top-hidden" type="text" name="storageIds">
									<input class="absolute top-hidden" type="text" name="storageId">
									<div id="advancedStorageSelect"></div>
								</td>
							</tr>
							<tr >
								<td class="w120 f-right">物流方式：</td>
								<td>
									<select id="advancedAuthSelect" class="chosen-select genre w180" name="authId" onchange="commonSearchSave.removeSearchModalActiveClass(this);">
										<option value="-1">--请选择--</option>
										<option value="96966823814575650" data-agentNameType="691" data-smt-batch="false" data-smt-batch-title="">tiktok-TikTok线上发货</option>
										</select>
								</td>
							</tr>
							<tr class="daysNodeId">
									<td class="w120 f-right">菜鸟单号有效期：</td>
									<td class="w650">
										<label><input class="orderAdvancedSearchRad" type="radio" name="days" value="-1" checked>全部</label>
										<label><input class="orderAdvancedSearchRad" type="radio" name="days" value="0">到期</label>
										<label><input class="orderAdvancedSearchRad" type="radio" name="days" value="1">小于1天</label>
										<label><input class="orderAdvancedSearchRad" type="radio" name="days" value="2">小于2天</label>
										<label><input class="orderAdvancedSearchRad" type="radio" name="days" value="3">小于3天</label>
										<label><input class="orderAdvancedSearchRad" type="radio" name="days" value="5">小于5天</label>
</td>
								</tr>
							<tr>
								<td class="w120 f-right">国家区域：</td>
								<td>
									<select id="advancedCountrySelect" class="chosen-select w180 genre" name="country" onchange="commonSearchSave.removeSearchModalActiveClass();"></select>
								</td>
							</tr>
							<tr>
								<td class="w120 f-right">拣货单打印：</td>
								<td class="w500">
									<label><input class="orderAdvancedSearchRad" type="radio" name="isPrintJh" value="-1" checked />全部</label>
									<label><input class="orderAdvancedSearchRad" type="radio" name="isPrintJh" value="1" />已打拣货单</label>
									<label><input class="orderAdvancedSearchRad" type="radio" name="isPrintJh" value="0" />未打拣货单</label>
								</td>
							</tr>
                            <tr>
                                <td class="w120 f-right">优先分配库存：</td>
                                <td class="w500">
                                    <label><input class="orderAdvancedSearchRad" type="radio" name="signPriorShip" value="-1" checked />全部</label>
                                    <label><input class="orderAdvancedSearchRad" type="radio" name="signPriorShip" value="1" />是</label>
                                    <label><input class="orderAdvancedSearchRad" type="radio" name="signPriorShip" value="0" />否</label>
                                </td>
                            </tr>
							<tr>
								<td class="w120 f-right">面单打印：</td>
								<td class="w500">
									<label><input class="orderAdvancedSearchRad" type="radio" name="isPrintMd" value="-1" checked />全部</label>
									<label><input class="orderAdvancedSearchRad" type="radio" name="isPrintMd" value="1" />已打面单</label>
									<label><input class="orderAdvancedSearchRad" type="radio" name="isPrintMd" value="0" />未打面单</label>
								</td>
							</tr>
							<tr>
									<td class="w120 f-right">提交单号：</td>
									<td class="w500">
										<label><input class="orderAdvancedSearchRad" type="radio" name="commitPlatform" value="" checked />全部</label>
										<label><input class="orderAdvancedSearchRad" type="radio" name="commitPlatform" value="success" />已提交</label>
										<label><input class="orderAdvancedSearchRad" type="radio" name="commitPlatform" value="uncommit" />未提交</label>
									</td>
								</tr>
							<tr>
								<td class="w120 f-right">买家留言：</td>
								<td class="w500">
									<label><input class="orderAdvancedSearchRad" type="radio" name="isHasOrderMessage" value="-1" checked />全部</label>
									<label><input class="orderAdvancedSearchRad" type="radio" name="isHasOrderMessage" value="1" />有留言</label>
									<label><input class="orderAdvancedSearchRad" type="radio" name="isHasOrderMessage" value="0" />没有留言</label>
								</td>
							</tr>
							<tr>
								<td class="w120 f-right">买家备注：</td>
								<td class="w500">
									<label><input class="orderAdvancedSearchRad" type="radio" name="isHasOrderComment" value="-1" checked />全部</label>
									<label><input class="orderAdvancedSearchRad" type="radio" name="isHasOrderComment" value="1" />有备注</label>
									<label><input class="orderAdvancedSearchRad" type="radio" name="isHasOrderComment" value="0" />没有备注</label>
								</td>
							</tr>
							<tr>
								<td class="w120 f-right">客服备注：</td>
								<td class="w500">
									<label><input class="orderAdvancedSearchRad" type="radio" name="isHasServiceComment" value="-1" checked />全部</label>
									<label><input class="orderAdvancedSearchRad" type="radio" name="isHasServiceComment" value="1" />有备注</label>
									<label><input class="orderAdvancedSearchRad" type="radio" name="isHasServiceComment" value="0" />没有备注</label>
								</td>
							</tr>
							<tr>
								<td class="w120 f-right">拣货备注：</td>
								<td class="w500">
									<label><input class="orderAdvancedSearchRad" type="radio" name="isHasPickComment" value="-1" checked />全部</label>
									<label><input class="orderAdvancedSearchRad" type="radio" name="isHasPickComment" value="1" />有备注</label>
									<label><input class="orderAdvancedSearchRad" type="radio" name="isHasPickComment" value="0" />没有备注</label>
								</td>
							</tr>
							<tr class="pickCommentColorTr">
								<td class="w120 f-right">拣货说明：</td>
								<td class="w500">
									<div class="custom-sign custom-sign-sel m-left0" id="pickingInstructionsDiv">
										<span class="module picking-a" uid="moduleA" data-val="009926" data-type="0" data-container="body" data-toggle="popover" data-placement="right" data-content=""></span>
										<span class="module picking-b" uid="moduleB" data-val="F00" data-type="0" data-container="body" data-toggle="popover" data-placement="right" data-content=""></span>
										<span class="module picking-c" uid="moduleC" data-val="0005FD" data-type="0" data-container="body" data-toggle="popover" data-placement="right" data-content=""></span>
										<span class="module picking-d" uid="moduleD" data-val="FF5800" data-type="0" data-container="body" data-toggle="popover" data-placement="right" data-content=""></span>
										<span class="module picking-e" uid="moduleE" data-val="8E0075" data-type="0" data-container="body" data-toggle="popover" data-placement="right" data-content=""></span>
										<span class="module picking-f" uid="moduleF" data-val="FF6666" data-type="0" data-container="body" data-toggle="popover" data-placement="right" data-content=""></span>
										<span class="module picking-g" uid="moduleG" data-val="FFCAC5" data-type="0" data-container="body" data-toggle="popover" data-placement="right" data-content=""></span>
										<span class="module picking-h" uid="moduleH" data-val="00D0FF" data-type="0" data-container="body" data-toggle="popover" data-placement="right" data-content=""></span>
									</div>
								</td>
							</tr>
							<tr>
								<td class="w120 f-right">附加信息：</td>
								<td class="w650" id="addContent">
									<label><input class="orderAdvancedSearchRad" type="checkbox" name="isMerge" value="1" />合并订单</label>
									<label><input class="orderAdvancedSearchRad" type="checkbox" name="isSplit" value="1" />拆分订单</label>
									<label><input class="orderAdvancedSearchRad" type="checkbox" name="isReShip" value="1" />重发包裹</label>
									<label><input class="orderAdvancedSearchRad" type="checkbox" name="isRefund" value="1" />有退款</label>
									<label><input class="orderAdvancedSearchRad" type="checkbox" name="signBanShip" value="1" />禁止处理</label>
									<label><input class="orderAdvancedSearchRad" type="checkbox" name="blackList" value="1" />黑名单</label>
								</td>
							</tr>
							<tr>
								<td class="w120 f-right p-top5 vAlignTop">平台标识：</td>
								<td class="w500">
									<label><input class="orderAdvancedSearchRad" type="radio" name="globalCollection" value="-1" checked />全部</label>
									<label><input class="orderAdvancedSearchRad" type="radio" name="globalCollection" value="0" />无标识</label>
									<label><input class="orderAdvancedSearchRad" type="radio" name="globalCollection" value="1" />Wish需妥投</label>
									<label><input class="orderAdvancedSearchRad" type="radio" name="globalCollection" value="2" />Lazada GC</label>
									<label><input class="orderAdvancedSearchRad" type="radio" name="globalCollection" value="9" />Lazada预售</label>
									<label class="w100"><input class="orderAdvancedSearchRad" type="radio" name="globalCollection" value="3" />SMT AEPLUS</label>
									<label class="w100"><input class="orderAdvancedSearchRad" type="radio" name="globalCollection" value="4" />SMT合单</label>
									<label class="w150"><input class="orderAdvancedSearchRad" type="radio" name="globalCollection" value="5" />SMT 10/12/15日达</label>
									<label class="w150"><input class="orderAdvancedSearchRad" type="radio" name="globalCollection" value="6" />Shopify中/高风险订单</label>
									<label class="w200"><input class="orderAdvancedSearchRad" type="radio" name="globalCollection" value="7" />Amazon订单产品买家申请取消</label>
									<label class="w150"><input class="orderAdvancedSearchRad" type="radio" name="globalCollection" value="8" />Amazon定制订单</label>
								</td>
							</tr>
						</table>
					</div>
					<!--通过operaComActive控制选中状态-->
					<div class="advancedSearchPackUpBox" style="position: relative;height: 30px;">
						<span class="advancedSearchPackUp" data-type="1">更多︾</span>
					</div>
					<div class="borderTop">
						<div class="operationCombination" >
							<span class="mRight10 buttonOverCol" onclick="cancelAdvanced();">取消</span>
							<span class="mRight10 buttonOverCol" onclick="resetAdvanced();">重置</span>
							<span class="mRight10 buttonOverCol operaComActive" onclick="advancedSearch();">搜索</span>
						</div>
					</div>
				</div>
			</form>
			</div>

		<div class="col-xs-12 dataType myj-show p0" data-type="1">
			<div class="col-xs-12 p0">
					<table class="searchTab">
						<tr>
							<td class="tit">订单状态：</td>
							<td class="con">
								<a class="mRight15 myj-aFocus myj-active" id="allState" href="javascript:" data-orderState="" onclick="setCondition('state','',this);">全部</a>
								<a class="mRight15 myj-aFocus" href="javascript:" data-orderState="ordered" onclick="setCondition('state','ordered',this);">未付款</a>
								<a class="mRight15 myj-aFocus" href="javascript:" data-orderState="risk_control" onclick="setCondition('state','risk_control',this);">风控中</a>
								<a class="mRight15 myj-aFocus" href="javascript:" data-orderState="paid" onclick="setCondition('state','paid',this);">待审核</a>
								<a class="mRight15 myj-aFocus" href="javascript:" data-orderState="approved" onclick="setCondition('state','approved',this);">待处理</a>
								<a class="mRight15 myj-aFocus" href="javascript:" data-orderState="processed" onclick="setCondition('state','processed',this);">已处理</a>
								<a class="mRight15 myj-aFocus" href="javascript:" data-orderState="allocated_has" onclick="setCondition('state','allocated_has',this);">待打单（有货）</a>
								<a class="mRight15 myj-aFocus" href="javascript:" data-orderState="allocated_out" onclick="setCondition('state','allocated_out',this);">待打单（缺货）</a>
								<a class="mRight15 myj-aFocus" href="javascript:" data-orderState="allocated_exception" onclick="setCondition('state','allocated_exception',this);">待打单（有异常）</a>
								<a class="mRight15 myj-aFocus" href="javascript:" data-orderState="shipped" onclick="setCondition('state','shipped',this);">已交运</a>
								<a class="mRight15 myj-aFocus" href="javascript:" data-orderState="refound" onclick="setCondition('state','refound',this);">已退款</a>
								<a class="mRight15 myj-aFocus" href="javascript:" data-orderState="ignore" onclick="setCondition('state','ignore',this);">已忽略</a>
								<a class="mRight15 myj-aFocus" href="javascript:" data-orderState="finish" onclick="setCondition('state','finish',this);">已完成</a>
							</td>
						</tr>
					</table>
				</div>
			<div class="col-xs-12 p0">
					<table class="searchTab noRightPd">
						<tr>
							<td class="tit p-top8">国家区域：</td>
							<td class="con countryArea" cid="countryscreen"></td>
						</tr>
					</table>
				</div>
			<div class="col-xs-12 p0" id="authIdDiv">
					<table class="searchTab noRightPd">
						<tr>
							<td class="tit">物流方式：</td>
							<td class="con relative">
								<div class="country-screen-out" id="allLogistics">
									<a class="mRight15 myj-aFocus myj-active" id="authIdAll" href="javascript:" data-smt-batch="false" data-smt-batch-title="" onclick="setCondition('authid','-1',this);">全部</a>
									<a class="mRight15 myj-aFocus" id="auth96966823814575650" href="javascript:" data-nametype="691" data-templateid="25" data-agentid="28172" data-smt-batch="false" data-smt-batch-title="" onclick="setCondition('authid','96966823814575650',this);">
										tiktok-TikTok线上发货</a>
									<a class="mRight15 myj-aFocus" id="authIdOther" href="javascript:" data-smt-batch="false" data-smt-batch-title="" onclick="setCondition('authid','0',this);">其它</a>
									</div>
								<button class="aBtnShow aBtn-Iocn multiple-absolute multipleChoice" data-value="0">多选<span class="num-plus">+</span></button>
								<div class="country-screen-out">
									<div class="screen-modal screen-modal-b multipleChoiceModal">
										<div class="tit titlist">
											<a href="javascript:" class="classify-a m-top5 logisticsScreen" cid="-1">全部</a>
										</div>
										<div class="p10 bg-white"><div class="content contentList"></div></div>
										<div class="selListOut">
											<table>
												<tbody>
													<tr>
														<td>
															<span class="title">已选方式：</span>
														</td>
														<td>
															<div class="selList"></div>
														</td>
													</tr>
												</tbody>
											</table>
										</div>
										<div class="operation-btn-group">
											<input class="button btn-determine" cid="sure" type="button" value="确认" />
											<input class="button btn-gray" cid="abolish" type="button" value="取消" />
										</div>
									</div>
								</div>
								<div class="logistics-Search p-left10 p-right80 relative hide logisticsSearch">
									<a class="a-absolute pointer eliminate">清除多选 X</a>
								</div>
							</td>
						</tr>
					</table>
				</div>
			</div>
	</div>
</div>
<div class="tab-content col-xs-12 border3 borderTopNo p-top15 p-bottom10" style="position:relative;">
	<div class="tab-pane active col-xs-12 p0" role="tabpanel">
		<div class="col-xs-12 p0" id="orderFieldDiv">
			<table class="searchTab">
				<tr>
					<td class="tit p-top0">排序方式：</td>
					<td class="con p-top0">
						<a class="mRight15 myj-aFocus" href="javascript:" data-orderfiled="sku" onclick="setOrderFiled('orderfiled','sku',this);">按产品SKU&nbsp;<span class="mRight5" style="margin-top: -4px;"></span></a>
						<a class="mRight15 myj-aFocus myj-active" href="javascript:" data-orderfiled="order_create_time" onclick="setOrderFiled('orderfiled','order_create_time',this);">按下单时间&nbsp;<span  style="margin-top: -4px;" class=" myjCaretDown mRight5"></span></a>
						<a class="mRight15 myj-aFocus" href="javascript:" data-orderfiled="order_timeout_time" onclick="setOrderFiled('orderfiled','order_timeout_time',this);">按剩余发货时间&nbsp;<span class="mRight5" style="margin-top: -4px;"></span></a>
						<a class="mRight15 myj-aFocus" href="javascript:" data-orderfiled="order_pay_time" onclick="setOrderFiled('orderfiled','order_pay_time',this);">按付款时间&nbsp;<span class="mRight5" style="margin-top: -4px;"></span></a>
						<a class="mRight15 myj-aFocus" href="javascript:" data-orderfiled="commit_platform_time" onclick="setOrderFiled('orderfiled','commit_platform_time',this);">按提交时间&nbsp;<span class="mRight5" style="margin-top: -4px;"></span></a>
						<a class="mRight15 myj-aFocus" href="javascript:" data-orderfiled="order_amount" onclick="setOrderFiled('orderfiled','order_amount',this);">按订单金额&nbsp;<span class="mRight5" style="margin-top: -4px;"></span></a>
						</td>
				</tr>
			</table>
		</div>
	</div>
</div>
<!--右则搜索通用-->

<div class="modal in-modal" id="addShopGroupModal" tabindex="-1" role="dialog" aria-hidden="false" data-backdrop="static" data-keyboard="false">
	<div class="modal-dialog w800">
		<div class="modal-content bs-example bs-example-tabs">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal">
					<span aria-hidden="true">&times;</span>
					<span class="sr-only">Close</span>
				</button>
				<h4 class="modal-title">创建分组</h4>
			</div>
			<div class="modal-body">
				<div>
					<div class="inline-block w80 f-right"><span class="f-red">*</span>分组名称：</div>
					<input class="form-component w200 groupNameIpt" type="text" placeholder="最多输入20字符" maxlength="20">
				</div>
				<div class="p-top20">
					<div class="inline-block m-top3 w80 f-right v-top"><span class="f-red">*</span>选择店铺：</div>
					<div class="inline-block">
						<div class="shopSiteDiv">
							<div class="noFlaot inline-block w650 m-left20 f0">
								<div class="m-bottom15">
									<label>
										<input type="checkbox" name="moreShopAll" />
										<span class="p-left10 f13">全选</span>
									</label>
								</div>
								<label class="m-bottom5 m-right30 f13 no-new-line" data-platform="tiktok" style="width: calc(25% - 30px);">
											<input id="moreShopId4829035" name="moreShopId" type="checkbox"
												   data-name="CareU Store_VN" value="4829035"/>
											<span data-toggle="tooltip" title="CareU Store_VN">CareU Store_VN</span>
											</label>
									<label class="m-bottom5 m-right30 f13 no-new-line" data-platform="tiktok" style="width: calc(25% - 30px);">
											<input id="moreShopId4829046" name="moreShopId" type="checkbox"
												   data-name="CareU Store_MY" value="4829046"/>
											<span data-toggle="tooltip" title="CareU Store_MY">CareU Store_MY</span>
											</label>
									<label class="m-bottom5 m-right30 f13 no-new-line" data-platform="tiktok" style="width: calc(25% - 30px);">
											<input id="moreShopId4829050" name="moreShopId" type="checkbox"
												   data-name="CareU Store_TH" value="4829050"/>
											<span data-toggle="tooltip" title="CareU Store_TH">CareU Store_TH</span>
											</label>
									<label class="m-bottom5 m-right30 f13 no-new-line" data-platform="tiktok" style="width: calc(25% - 30px);">
											<input id="moreShopId4829103" name="moreShopId" type="checkbox"
												   data-name="CareU Store_PH" value="4829103"/>
											<span data-toggle="tooltip" title="CareU Store_PH">CareU Store_PH</span>
											</label>
									<label class="m-bottom5 m-right30 f13 no-new-line" data-platform="tiktok" style="width: calc(25% - 30px);">
											<input id="moreShopId5114636" name="moreShopId" type="checkbox"
												   data-name="CareU Store_SG" value="5114636"/>
											<span data-toggle="tooltip" title="CareU Store_SG">CareU Store_SG</span>
											</label>
									<label class="m-bottom5 m-right30 f13 no-new-line" data-platform="our" style="width: calc(25% - 30px);">
											<input id="moreShopId0" name="moreShopId" type="checkbox"
												   data-name="手工订单" value="0"/>
											<span data-toggle="tooltip" title="手工订单">手工订单</span>
											</label>
									</div>
						</div>
					</div>
				</div>
			</div>
			<div class="modal-footer">
				<button class="button btn-determine" type="button" onclick="SHOP_GROUP.addShopGroupConfirm();">确定</button>
				<button class="button btn-gray m-left10" type="button" data-dismiss="modal">返回</button>
			</div>
		</div>
	</div>
</div>
<input id="agentIdAndDetil" value="{&#034;all&#034;:[{&#034;agentId&#034;:&#034;2732346&#034;,&#034;agentProviderName&#034;:&#034;tiktok-TikTok线上发货&#034;,&#034;orderCount&#034;:0,&#034;id&#034;:&#034;96966823814575650&#034;}],&#034;2732346&#034;:[{&#034;agentId&#034;:&#034;2732346&#034;,&#034;agentProviderName&#034;:&#034;tiktok-TikTok线上发货&#034;,&#034;orderCount&#034;:0,&#034;id&#034;:&#034;96966823814575650&#034;}]}" type="hidden" />
<input id="agentList" value="[{&#034;id&#034;:2732346,&#034;gType&#034;:691,&#034;agentName&#034;:&#034;tiktok&#034;}]" type="hidden" />
<script type="text/javascript">
	$('[data-toggle="popover"]').popover();

    //初始化店铺展开收起
    var initShopIsShowHide = function () {
        //店铺展开收起
        var $shopIsShowHideBox = $('.shopIsShowHideBox'),
            $shopMoreBox = $('.shopMoreBox');
        $shopMoreBox.empty();
        $shopIsShowHideBox.css({'height': '', 'overflow': ''}); //店铺显示全部
        if($('#shopDiv').height() > 85){ //判断用户店铺账号是否超过三行
            var isShopShow = myjStorage.get('isShopShow')(), //获取状态，判断用户之前点击的状态，1=收起状态；0或者没有=展开状态
                $shopMoreShowHideBox = '',
                $shopShowHideMoreName = '',
                $shopShowHideMoreIcon = '';

            if(isShopShow && +isShopShow){ //如果状态=1
                $shopMoreBox.html('<div class="shop-more-box position-r0 shopMoreShowHideBox" data-type="0">' +
                    '<a href="javascript:"><span class="shopShowHideMoreName f-black">更多</span> ' +
                    '<span class="shopShowHideMoreIcon downCreat"></span></a></div>'); //添加更多操作按钮，点击时展开隐藏的店铺
                $shopIsShowHideBox.css({'height': '80px', 'overflow': 'hidden'}); //店铺只显示三行
            }else{
                $shopMoreBox.html('<div class="shop-more-box position-r0 shopMoreShowHideBox" data-type="1">' +
                    '<a href="javascript:"><span class="shopShowHideMoreName f-black">收起</span> ' +
                    '<span class="shopShowHideMoreIcon upCreat"></span></a></div>'); //添加收起操作按钮，点击时收起多余的店铺
                $shopIsShowHideBox.css({'height': '', 'overflow': ''}); //店铺显示全部
            }
            $shopMoreShowHideBox = $('.shopMoreShowHideBox'); //更多操作节点
            $shopShowHideMoreName = $shopMoreShowHideBox.find('.shopShowHideMoreName'); //更多操作节点下的内容
            $shopShowHideMoreIcon = $shopMoreShowHideBox.find('.shopShowHideMoreIcon'); //更多操作节点下的图标
            $shopMoreShowHideBox.on('click', function () { //绑定点击事件
                var $that = $(this),
                    type = $that.attr('data-type');

                if(+type === 1){ //如果type=1,
                    $that.attr('data-type', '0'); //把type改为0
                    $shopShowHideMoreName.html('更多'); //内容改为更多
                    $shopShowHideMoreIcon.removeClass('upCreat').addClass('downCreat'); //图标改为向下箭头
                    $shopIsShowHideBox.css({'height': '80px', 'overflow': 'hidden'}); //把店铺收起，只显示三行店铺
                    myjStorage.set('isShopShow', '1')(); //把状态改为1（收起状态），用来刷新页面初始化时判断是展开还是收起
                }else{
                    $that.attr('data-type', '1'); //把type改为1
                    $shopShowHideMoreName.html('收起'); //内容改为收起
                    $shopShowHideMoreIcon.removeClass('downCreat').addClass('upCreat'); //图标改为向上箭头
                    $shopIsShowHideBox.css({'height': '', 'overflow': ''}); //把店铺展开，显示全部店铺
                    myjStorage.set('isShopShow', '0')(); //把状态改为0（展开状态），用来刷新页面初始化时判断是展开还是收起
                }
            });
        }
    };

    $(function () {
        var $keepStateIpt = $('#keepState'),
			keepStateState = $keepStateIpt.data('state'),
            keepStateIsvoided = +$keepStateIpt.data('isvoided'),
			$orderFiltrateIsFold = $('.orderFiltrateIsFold'),
            $orderFiltrateIsFoldBox = $('.orderFiltrateIsFoldBox'); //订单list的筛选项
        if(keepStateState || keepStateIsvoided === 1){ //判断当前订单状态不为空（全部订单和已搁置状态为空）或者isvoided=1（已搁置状态isvoided=1）
            //判断订单页是否需要默认折叠list筛选项
            var isDefaultFold = myjStorage.get('isDefaultFold')(), //储存在浏览器中的值，判断是否默认折叠筛选项
                $orderFiltrateFold = $('.orderFiltrateFold'), //订单list的展开、收起icon
                $isDefaultFold = $('.isDefaultFold'), //订单list的默认折叠选项框
                $commonSearchSaveBox = $('.commonSearchSaveBox'),
                $saveFiltrateModalBox = $('.saveFiltrateModalBox');

            if(isDefaultFold && +isDefaultFold){ //如果有值，并且值=1
				$orderFiltrateIsFold.removeClass('p-bottom10').removeClass('border3');
                $isDefaultFold.val(1).prop('checked',true); //把默认折叠选项框勾选
                $orderFiltrateIsFoldBox.addClass('hide'); //把筛选项隐藏
                $orderFiltrateFold.addClass('order-filtrate-up').removeClass('order-filtrate-down').attr('data-type','hide'); //把展开收起的icon改为对应状态
                $commonSearchSaveBox.find('span').removeClass('hide');
                $commonSearchSaveBox.find('button').addClass('hide');
                $saveFiltrateModalBox.addClass('p-left10');
            }else{ //如果没值
				$orderFiltrateIsFold.addClass('p-bottom10').addClass('border3');
                $isDefaultFold.val(0).prop('checked',false);//把默认折叠选项框取消勾选
                $orderFiltrateIsFoldBox.removeClass('hide'); //把筛选项显示
                $orderFiltrateFold.addClass('order-filtrate-down').removeClass('order-filtrate-up').attr('data-type','show'); //把展开收起的icon改为对应状态
                $commonSearchSaveBox.find('span').addClass('hide');
                $commonSearchSaveBox.find('button').removeClass('hide');
                $saveFiltrateModalBox.removeClass('p-left10');
            }
            commonSearchSave.getThisOrderStateSearch(); //获取当前状态下的已保存筛选模板
		}else{
            $orderFiltrateIsFoldBox.removeClass('hide'); //把筛选项显示
		}
		MULTI_SEARCH.init(['订单号', '包裹号', '跟踪号', '平台SKU', '商品SKU', '商品编码', '平台编号', '产品ID'], '', {
			placeholder: '多个搜索请用回车换行(无需逗号结尾)，精确匹配最多支持1000个，模糊匹配最多支持30个，超过限制不会搜索出结果',
			spaceWrap: true, // 支持空格隔开
			chineseComma: true // 支持中文逗号隔开
		});

        initShopIsShowHide(); //初始化店铺展开收起
		SHOP_GROUP.init({type: 'init', active: 'myj-active', aClass: 'myj-aFocus', pageType: 'order'});//初始化订单多店铺分组
    });

    var logisticsData = {
        agentIdAndDetilMap: $('#agentIdAndDetil').val(),
        agentlist: $('#agentList').val()
    };
    logisticsStrategy.setLogisticsData(logisticsData);

	$('.dataTypeClick').click(function(){
		var objDiv = $(this).find('.rightTabActive'),
			objDivNum = $(objDiv).attr('data-type'),
			$activeA = $('.orderSearchType').find('a.myj-active');

		$(objDiv).removeClass('rightTabActive');
		if (+objDivNum === 1) {
			$(this).find('[data-type="2"]').addClass('rightTabActive');
			$('#keepState').data('selecttype', 2); // data-selecttype= 1或者undefined是筛选；2=搜索；
			$('.searchHideDiv').addClass('hide'); // 点击搜索的时候移除掉列表页上方的页签
			$('.orderFiltrateIsFoldBox2').removeClass('hide');
		}else{
			$(this).find('[data-type="1"]').addClass('rightTabActive');
			setChoose();
			$('#keepState').data('selecttype', 1); // data-selecttype= 1或者undefined是筛选；2=搜索；
			$('.searchHideDiv').removeClass('hide'); // 点击筛选的时候移添加列表页上方的页签
			if($('.orderFiltrateFold ').attr('data-type') === 'hide') {
				$('.orderFiltrateIsFoldBox2').addClass('hide');
			}
		}
		$('.dataType').each(function(){
			$(this).removeClass('myj-show');
			if (+($(this).attr('data-type')) !== +objDivNum) {
				$(this).addClass('myj-show');
			}
		});

		// 所有页复选框取消选中
		$("input[name='allPage']").prop("checked", false);
		//切换完后再走一遍搜索类型的方法，重新更正下搜索框展示样式
		if (+objDivNum === 1) setSearchType($activeA.attr('data-name'), $activeA);
	});

	var resetLeft = function(obj){
		$('#dropdownRuleMenu2').css('left',($(obj).position().left - 25) + "px");
	};

	$(document).on('click','.btnClick',function(){
		var id = $(this).attr('data-name');
		$('#'+id).modal('show');
	});
	$('a.aBtnShow').click(function(){
		var value = $(this).attr('data-value'),
			$cart = $(this).find('span[cid="creat"]'),
			$moreTxt = $(this).find('.text-more');
		if(+value){
			$('a.showOther').hide();
			$(this).attr('data-value',0);
			$cart.removeClass('upCreat').addClass('downCreat');
			$moreTxt.html('更多');
		}else{
			$('a.showOther').show();
			$(this).attr('data-value',1);
			$cart.removeClass('downCreat').addClass('upCreat');
			$moreTxt.html('收起')
		}
	});
	$('[cid="countryscreen"]').countryscreen({
		callBack:function(countryNames){
			setCondition('country',countryNames,this);
		}
	});

	var getUserSetAttr = function(arr, val, desc){
		var str = "";
		if(arr.indexOf(val) == -1){
			str += '<option value="'+ val +'">'+ desc +'</option>';
		}
		return str;
	};
	/*高级搜索*/
	//自定义属性添加btn点击事件
	var userSetAttr = function(obj){
		var searchArr = "";
		$("select[name='searchTypes']").each(function(){
			searchArr += $(this).val() + ",";
		});
		var optionStr = "";
		optionStr += getUserSetAttr(searchArr, "orderId", "订单号");
		optionStr += getUserSetAttr(searchArr, "packageNum", "包裹号");
		optionStr += getUserSetAttr(searchArr, "trackNum", "跟踪号");
		optionStr += getUserSetAttr(searchArr, "platformSku", "平台SKU");
		optionStr += getUserSetAttr(searchArr, "productSku", "商品SKU");
        optionStr += getUserSetAttr(searchArr, "skuCode", "商品编码");
		optionStr += getUserSetAttr(searchArr, "buyerAccount", "买家账号");
		optionStr += getUserSetAttr(searchArr, "contactName", "收件人");
		optionStr += getUserSetAttr(searchArr, "batchNum", "拣货单号");
		optionStr += getUserSetAttr(searchArr, "sellerComment", "备注");
		if (false) {
			optionStr += getUserSetAttr(searchArr, 'extendedOrderId', '平台编号');
		}

		if(optionStr != ""){
			var addAdvSearchType = ['orderId', 'packageNum', 'packageNum'],//订单号、包裹号、跟踪号、平台SKU添加高级搜索功能，传入后台时只给第一个，后面搜索只做展示用
				selVal = $(obj).prev('div').find('select[name="searchTypes"]').val(),
				isAddAdvSearch = addAdvSearchType.indexOf(selVal) !== -1,//是否需要添加高级搜索
				advSearchStr = '<select class="w90 m-left26 genre m-left0 m-right10 orderAdvSearchType ' + (isAddAdvSearch ? '' : 'hide') + '" disabled>' +
							'<option value="1">精确匹配</option><option value="0">模糊匹配</option></select>',

				$str = $('<div data-names="otherAttr" class="mBottom5 mTop10 advSerachDiv">'+
				'<select class="mTop5 genre advSearchType" name="searchTypes" onchange="setAdvSearchType(1, this);" style="margin:0 6px 0 25px;width: 150px;">'+ optionStr + '</select>'+
				'<input type="text" name="contents" class="mRight5" style="border-radius: 4px;border: 1px solid #ccc;padding: 6px 12px;line-height: 1.42857143;height: 34px;width: 500px;" />'+
				// (isAddAdvSearch ? advSearchStr : '') +
				advSearchStr +
				'<span class="glyphicon glyphicon-remove" style="cursor:pointer"></span>'+
				'</div>');

			$(obj).before($str);
			setAdvSearchType(1, $str.find('.advSearchType'));
			advSearchSelShow();//高级搜索框显示、隐藏处理
		}
	};

	$(document).on('click','div[data-names="otherAttr"] span.glyphicon-remove',function(){
		$(this).closest('div').remove();
		advSearchSelShow();//高级搜索框显示、隐藏处理
	});
	$(document).off('change', 'select[name="orderAdvSearchType"]').on('change', 'select[name="orderAdvSearchType"]', function () {
		var thisSelVal = $(this).val(),
			otherSelect = $('div[data-names="otherAttr"]').find('.orderAdvSearchType');

		otherSelect.val(thisSelVal);
	});

	$(document).off('click', 'input[name="isHasPickComment"]').on('click', 'input[name="isHasPickComment"]', function () {
		var $this = $(this),
			checkVal = $this.val();
		$this.closest('table').find('tr.pickCommentColorTr')[!+checkVal ? 'addClass' : 'removeClass']('hide');
	});
	/*高级搜索end*/

	var userId = 1411053;

	$(document).ready(function () {
		var $shopGroupType = $('span.shopGroupType'),
			orderRecordShopGroupType = myjStorage.get('orderRecordShopGroupType_' + userId)();

		$shopGroupType.removeClass('shopGroupType').addClass('recordShopGroupType');

		// 如果本地缓存记录的值为2，说明离开订单页面前为多店铺状态，此时触发shopGroup.js的多店铺点击事件方法
		if (orderRecordShopGroupType === '2') {
			SHOP_GROUP.shopGroupTypeClickFn($('.recordShopGroupType[data-type="1"]'));
		}

		// 注册新版日期组件
		var today = moment().format('YYYY-MM-DD'),
			startDate = today + ' 00:00:00',
			endDate = today + ' 23:59:59';
		$('.starDayInput').daterangepicker({
			singleDatePicker: true,
			timePicker24Hour: true, //是否24小时制
			timePicker: true, //是否支持选择时分
			timePickerSeconds: true, //是否支持选择秒
			startDate: startDate,
			locale: {
				format: 'YYYY-MM-DD HH:mm:ss'//date/time格式 YYYY-MM-DD HH:mm:ss
			},
			showCustomRangeLabel: false, //是否在快捷选项的最后面加上一个Custom Range(自定义)的快捷选项
			showRangesConfigLabel: true, //是否展示ranges配置参数对象中配置的自定义快捷选项
			ranges: {
				'今天': [
					moment().startOf('day')
				],
				'昨天': [
					moment().subtract('days', 1).startOf('day')
				]
			},
		});
		$('.endDayInput').daterangepicker({
			singleDatePicker: true,
			timePicker24Hour: true, //是否24小时制
			timePicker: true, //是否支持选择时分
			timePickerSeconds: true, //是否支持选择秒
			startDate: endDate,
			locale: {
				format: 'YYYY-MM-DD HH:mm:ss'//date/time格式 YYYY-MM-DD HH:mm:ss
			},
			showCustomRangeLabel: false, //是否在快捷选项的最后面加上一个Custom Range(自定义)的快捷选项
			showRangesConfigLabel: true, //是否展示ranges配置参数对象中配置的自定义快捷选项
			ranges: {
				'今天': [
					moment().format('YYYY-MM-DD') + ' 23:59:59'
				],
				'昨天': [
					moment().subtract('days', 1).format('YYYY-MM-DD') + ' 23:59:59'
				]
			},
		});
		$('.starDayInput').val('').data('daterangepicker').clickClear();
		$('.endDayInput').val('').data('daterangepicker').clickClear();
	})

	$(document).off('click', '.recordShopGroupType').on('click', '.recordShopGroupType', function () {
		// 将原本shopGroup.js中shopGroupType类绑定的点击事件方法搬到recordShopGroupType类点击事件中
		// 若打开了多店铺模式，本地缓存中记录值，再次进入页面后默认调用多店铺点击事件的方法
		var $this = $(this),
			type = ($this.attr('data-type')) === '1' ? '2' : '1';

		SHOP_GROUP.shopGroupTypeClickFn(this);
		myjStorage.set('orderRecordShopGroupType_' + userId, type)();
	});

</script>
